/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - MessageEnumDemo
 * <p>Powered by webrx On 2022-08-10 16:35:56
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class MessageEnumDemo {
    public static void main(String[] args) {
        var e = MessageEnum.MESSAGE;
        e = MessageEnum.fromTypeCode(1000);
        switch (e){
            case MESSAGE -> {
                System.out.println("信息成功"+e.name()+e.ordinal()+e.getCode()+e.getMsg());
            }
            case ERROR -> {
                System.out.println(e.getMsg());
            }
            case OPEN -> {
                System.out.println(e.getMsg());
            }
            case SAVE -> {
                System.out.println(e.getMsg());
            }
            default -> {
                System.out.println("未知操作");
            }
        }
    }
}
